{	Problem: http://codeforces.ru/problemset/problem/88/C
 	Verdict: Accepted
}
uses SysUtils, Math;

var 
    a,b:longint;

procedure swap(var a,b:int64);
var
    t:int64;
begin
t:=a;
a:=b;
b:=t;
end;

function gcd(a,b:int64):int64;
begin
if a<b then swap(a,b);
while b>0 do begin
            a:=a mod b;
            swap(a,b);
end;
result:=a;
end;

function nok(a,b:int64):int64;
begin
result:=(a*b) div gcd(a,b);
end;

procedure solve(a,b,c:longint);  
var
    ans:byte;
    n,i,k,ka,kb:int64;
begin
ans:=0;
n:=nok(a,b);
i:=a;
k:=0;
while i<=n do begin
    inc(i,a);
    if i mod b=0 then inc(k);
end;
ka:=n div a;
kb:=n div b-k;
if ka>kb then ans:=1 else
if ka<kb then ans:=2 else ans:=3;
if ((ans=1) and (c=0)) or ((ans=2) and (c=1)) then write('Dasha') else
if ((ans=1) and (c=1)) or ((ans=2) and (c=0)) then write('Masha') else
if ans=3 then write('Equal');
end;
    
begin
read(a,b);
if a>b then solve(a,b,0) else solve(b,a,1); 
end.